package com.wis.mapper;

import com.wis.entity.LiveCourseEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface LiveCourseMapper {

    @Select("SELECT * FROM livecourse WHERE t_id LIKE CONCAT('%', #{tName}, '%') AND c_id LIKE CONCAT('%', #{cName}, '%')")
    List<LiveCourseEntity> selectLiveCourse(@Param("tName") String tName, @Param("cName") String cName);

//    @Select("SELECT * FROM livecourse " +
//            "WHERE t_id LIKE CONCAT('%', #{tName}, '%') " +
//            "AND c_id LIKE CONCAT('%', #{cName}, '%') " +
//            "LIMIT #{pageSize} OFFSET #{offset}")
//    List<LiveCourseEntity> selectLiveCourse(
//            @Param("tName") String tName,
//            @Param("cName") String cName,
//            @Param("pageSize") int pageSize,
//            @Param("offset") int offset
//    );
}
